﻿<%@ Page Language="C#" MasterPageFile="~/Shared/MainPage.Master" AutoEventWireup="true" CodeBehind="InstrumentCategoryList.aspx.cs" Inherits="Runda.CMS.Portal.SyncManage.InstrumentCategoryList" %>
<%@ Register Assembly="RadTreeView.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server"> 
 <script src="../Content/global.js" type="text/javascript"></script>     
<link href="../Content/global.css" rel="stylesheet" type="text/css" /> 
    <link href="../Content/Find/find.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Content/jquery-1.3.2.js"></script>
    <script type="text/javascript" src="../Content/Bussiness/datasync.js"></script>
    
     <script type="text/javascript">
         function ContextMenuClick(node, itemText, ID) {
             if (ID == "View") {
                 openMyFullWin('InstrumentList.aspx?categoryGUID=' + node.Value, 'InstrumentInfo');
             }
             if (ID == "add") {
                 openMyFullWin('InstrumentInfo.aspx?categoryGUID=' + node.Value, 'InstrumentInfo');
             }
         }
       
        function Refersh() {
            document.getElementById('<%=btnRefersh.ClientID %>').click();
        }            
        function syncData(v) {
            //TODO 待同步调用
            sync(v);
        }
       
    </script>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphBody" runat="server">
    <rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
             <rad:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="InstrumentList" LoadingPanelID="AjaxLoadingPanel"/> 
                </UpdatedControls>
            </rad:AjaxSetting>
        </AjaxSettings>
    </rad:RadAjaxManager>
    <rad:AjaxLoadingPanel runat="server" ID="AjaxLoadingPanel">
        <img src="../Images/Loading.gif" />数据载入...
    </rad:AjaxLoadingPanel>
         <div class="Container">
         <asp:HiddenField runat="server" ID="hiddenCategoryID" /> 
         <asp:Label ID="test" runat="server" style="display:none"/>
            <table id="appFind" class="find" cellspacing="0" cellpadding="0" border="0"> 
                <tbody>
                    <tr height="23">
                        <td class="wizHead">
                            <table style="table-layout: fixed; font-size: 9pt" cellspacing="0" cellpadding="0"
                                width="100%" height="100%">
                                <colgroup>
                                    <col>
                                    <col width="90">
                                    <col width="60">
                                    <tbody>
                                        <tr>
                                            <td style="color: #ffffff">
                                                <b>器械信息</b>
                                            </td>
                                            <td class="icMenu mnuRight" nowrap>                                          
                                                <span class="menu" onclick="syncData('Instrument');">
                                                    <img src="../Content/Grid/New_16_blue.gif" align="absBottom"/><span style="color: #ffffff">数据同步</span></span>   
                                            </td>
                                            <td class="icMenu mnuRight" nowrap>
                                                <span class="menu" onclick="Refersh();">
                                                    <img src="../Images/16_L_refresh.gif" align="absBottom"/><span style="color: #ffffff">刷新</span></span>
                                            </td>
                                        </tr>
                                    </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr id="__appFind_trQuery">
                        <td class="wizBox1">
                            <div style="padding:0;margin:0;overflow: auto;float:left;width: 30%; height:550px"> 
                                <rad:RadTreeView ID="RadTreeView1" runat="server" 
                                    ContextMenuContentFile="InstrumentCategoryToolMenu.xml"  
                                    onnodeclick="RadTreeView1_NodeClick" AutoPostBack="True" 
                                    BeforeClientContextClick="ContextMenuClick">
                                </rad:RadTreeView>
                            </div>
                           <div style="padding:0;margin:0;overflow: auto;float:left;width: 70%; height: 550px">
                            <rad:RadGrid runat="server" ID="InstrumentList" Skin="OCM" AutoGenerateColumns="False" AllowSorting="True" GridLines="None">
                                <MasterTableView DataKeyNames="instrumentGUID"> 
                                    <Columns>
                                        <rad:GridTemplateColumn HeaderText="编码">
                                         <ItemTemplate>
                                            <asp:HyperLink runat="server" ID="HyperLink1" ToolTip='<%#Eval("InstrumentCode")%>'  Text='<%# Eval("InstrumentCode")%>' Target="_blank" NavigateUrl='<%# "../SyncManage/InstrumentInfo.aspx?instrumentID="+Eval("instrumentGUID") %>' ></asp:HyperLink>
                                         </ItemTemplate>
                                     </rad:GridTemplateColumn>
                                        <rad:GridBoundColumn DataField="InstrumentName" HeaderText="名称"></rad:GridBoundColumn>
                                        <rad:GridBoundColumn DataField="InstrumentStandard" HeaderText="规格"></rad:GridBoundColumn>
                                        <rad:GridBoundColumn DataField="unit" HeaderText="单位"></rad:GridBoundColumn>
                                        <rad:GridBoundColumn DataField="vendor" HeaderText="厂家"></rad:GridBoundColumn>
                                       <%-- <rad:GridBoundColumn DataField="Cost" HeaderText="成本"></rad:GridBoundColumn>
                                        <rad:GridBoundColumn DataField="PresellPrice" HeaderText="指导价"></rad:GridBoundColumn>--%>
                                    </Columns>
                                </MasterTableView>
                            </rad:RadGrid>
                        </div>
                        </td>
                    </tr>
                </tbody>
        </table>         
        </div>         
        	<div id="__divRuning" style="POSITION: absolute; Z-INDEX: 108; width:260px; height:47px; BACKGROUND-COLOR: white; border:#9E9E9B 1px solid; font:bold 14px; color:#FF5A00; text-align:center; padding-top:16px; DISPLAY:none;">数据同步中，请稍候...</div>                  
    <asp:Button ID="btnRefersh" runat="server" Text="Button" 
             onclick="btnRefersh_Click" style="display:none"/>
</asp:Content>
